package com.aspose.cells;

abstract class zbph implements zahz {
   protected boolean c;
   protected boolean d;
   protected boolean e;

   public zbph(boolean var1, boolean var2, boolean var3) {
      this.c = var1;
      this.d = var2;
      this.e = var3;
   }

   protected abstract zagu a(double var1);

   protected abstract zagu a(double var1, int var3);

   protected abstract zagu a(int var1);

   protected abstract zagu c();

   protected abstract boolean b();

   protected boolean c_() {
      return false;
   }

   public boolean a(zagu var1, boolean var2) {
      if (var1.b() == 12) {
         if (var2) {
            return this.d ? this.b() : true;
         } else {
            return this.c_() ? true : this.b();
         }
      } else {
         return var1.b() == 3 && ((zyy)var1).m() ? this.b() : false;
      }
   }

   public zagu a(zagu var1, zaay var2, boolean var3) {
      var1 = var1.e(var2);
      switch(var1.b()) {
      case 0:
         if (this.e) {
            return zyw.a;
         }

         return var1;
      case 1:
         if (this.d) {
            return zzg.a;
         } else if (!this.c && var3) {
            return zyw.a;
         } else {
            if (((zyv)var1).k()) {
               return this.a(1.0D);
            }

            return this.c();
         }
      case 3:
         return this.a(((zyy)var1).k());
      case 12:
         if (var3) {
            if (this.d) {
               return this.c();
            }

            return zyw.a;
         } else {
            if (this.c_()) {
               return zyw.a;
            }

            return this.c();
         }
      default:
         zyy var4;
         if (this.d) {
            var4 = var1.a(var2, 5);
            return (zagu)(var4 == null ? zzg.a : this.a(var4.k()));
         } else if (var3) {
            return (zagu)(this.c ? this.c() : zyw.a);
         } else {
            var4 = var1.a(var2, 7);
            return (zagu)(var4 == null ? zzg.a : this.a(var4.k()));
         }
      }
   }

   public zagu a(zagu var1, zaay var2, boolean var3, int var4) {
      var1 = var1.e(var2);
      switch(var1.b()) {
      case 0:
         if (this.e) {
            return zyw.a;
         }

         return var1;
      case 1:
         if (this.d) {
            return zzg.a;
         } else if (!this.c && var3) {
            return zyw.a;
         } else {
            if (((zyv)var1).k()) {
               return this.a(1.0D, var4);
            }

            return this.a(var4);
         }
      case 3:
         return this.a(((zyy)var1).k(), var4);
      case 12:
         if (var3) {
            if (this.d) {
               return this.a(var4);
            }

            return zyw.a;
         }

         return this.a(var4);
      default:
         zyy var5;
         if (this.d) {
            var5 = var1.a(var2, 5);
            return (zagu)(var5 == null ? zzg.a : this.a(var5.k()));
         } else if (var3) {
            return (zagu)(this.c ? this.a(var4) : zyw.a);
         } else {
            var5 = var1.a(var2, 7);
            return (zagu)(var5 == null ? zzg.a : this.a(var5.k()));
         }
      }
   }
}
